
package com.example.demo.IJKPlayer

import android.content.Intent
import androidx.appcompat.app.AppCompatActivity
import android.os.Bundle
import android.widget.Button
import com.example.demo.R




class IJKPlayerActivity : AppCompatActivity() {
    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_ijkplayer)
        setOnClicn()
    }

    fun setOnClicn(){
        findViewById<Button>(R.id.xianggang).setOnClickListener {
//            stopStartVIdeo(" rtmp://202.69.69.180:443/webcast/bshdlive-pc")
//            MediaActivity.startActivity(this,"https://cctv5cnch5ca.v.wscdns.com/live/cctv5_2/index.m3u8?contentid=2820180516001")
//            GSYVideoPlayerActivity.startActivity(this,"");
//            val to = Intent(this, PlayerFactoryActivity::class.java)
//            this.startActivity(to)
        }
        findViewById<Button>(R.id.hunan).setOnClickListener {
//            stopStartVIdeo(" rtmp://58.200.131.2:1935/livetv/hunantv")
            MediaActivity.startActivity(this,"https://cctvksh5ca.v.kcdnvip.com/clive/cctv13_2/index.m3u8?contentid=2820180516001")
        }
        findViewById<Button>(R.id.meiguo).setOnClickListener {
//            stopStartVIdeo("rtmp://media3.scctv.net/live/scctv_800")
            MediaActivity.startActivity(this,"rtmp://media3.scctv.net/live/scctv_800")
        }
        findViewById<Button>(R.id.http).setOnClickListener {
            MediaActivity.startActivity(this,"http://video19.ifeng.com/video07/2013/11/11/281708-102-007-1138.mp4")
//            stopStartVIdeo("http://video19.ifeng.com/video07/2013/11/11/281708-102-007-1138.mp4")
        }
    }

}